home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Toolkit for Nursing Excel…t End of Life Transition
/
Toolkit for Nursing Excellence at End of Life Transition.iso
/
InstallTneel.hta
< prev
next >
Wrap
Text File
|
2001-11-01
|
6KB
|
154 lines
<HTA:APPLICATION ICON=tneelne.ico
APPLICATIONNAME = "tneel-ne"
WINDOWSTATE = "maximize"
BORDERSTYLE = "complex"
SINGLEINSTANCE = "yes"
NAVIGABLE = "yes">
<head>
<title>TNEEL Installation</title>
<HTA:APPLICATION >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="ne_style.css">
<style type="text/css">
<!--
A:hover { color: #CC3300; text-decoration: underline}
.evalink { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: #003399; text-decoration: underline}
.words { font-family: Arial, Helvetica, sans-serif; font-size: 14pt; font-weight: normal; color: #000000}
-->
</style>
<SCRIPT LANGUAGE="vbscript">
dim messageWindow
function InstallFiles()
dim fso, fld, fil
dim validDrive
dim TargetPath
dim SourcePath
dim FileToBeCopied
dim FileDest
set messageWindow = window.showModelessDialog("copying.htm","","dialogHeight: 100px; dialogWidth: 300px; center: Yes; help: No; resizable: No; status: No; scroll: No;")
validDrive=window.document.location
set fso=CreateObject("Scripting.FileSystemObject")
validdrive=replace(validdrive, "file:///", "")
validDrive = replace(validDrive, "%20", " ")
validDrive = replace(validDrive, "%23", "#")
validDrive = replace(validDrive, "%25", "%")
validDrive = replace(validDrive, "%7b", "{")
validDrive = replace(validDrive, "%7d", "}")
validDrive = replace(validDrive, "%5e", "^")
validDrive = replace(validDrive, "%7e", "~")
validDrive = replace(validDrive, "%5b", "[")
validDrive = replace(validDrive, "%5d", "]")
validDrive = replace(validDrive, "%60", "'")
validDrive = replace(validDrive, "%26", "&")
validdrive=left(validDrive,len(validdrive)-16)
sourcepath=validDrive
' create the folder, c:\program files\Tneel.
' Checking if the folder exists first. If it does, skip the following
' folder building codes
if fso.folderexists ("c:\program files\Tneel") = true then
fso.deletefolder ("c:\program files\Tneel"), true
end if
fso.createfolder ("c:\program files\Tneel")
TargetPath = "c:\program files\Tneel\"
' Copy root files
for each fil in fso.getfolder(validdrive).files
if fil.name<>"InstallTneel.hta" and fil.name<>"message.htm" then
FileToBeCopied = SourcePath & fil.name
FileDest = TargetPath & fil.name
fso.copyfile FileToBeCopied, FileDest
end if
next
dim subFld
dim FolderToBeCopied
dim TargetFolderName
' Create and Copy folders and subfolders
set fld = fso.GetFolder (validDrive)
for each subfld in fld.subfolders
FolderToBeCopied = ValidDrive & subfld.name
TargetFolderName = TargetPath & subfld.name
fso.copyfolder foldertobecopied, targetfoldername
next
createShortcut()
window.close
end function
function createShortcut()
'if it already exists it will be re-written
on error resume next
dim WshShell
dim oShellLink
dim DesktopPath
dim MyDocsPath
dim fso
dim file1
dim fileSource, fileDest
dim iconMessage
messageWindow.close()
set iconMessage = window.showModalDialog("message.htm","","dialogHeight: 150px; dialogWidth: 600px; center: Yes; help: No; resizable: No; status: No; scroll: No;")
Set WshShell = CreateObject("WScript.Shell")
' make sure that mplayer2 is registered to play .mp3 files.
tempvar = WSHShell.RegRead ("HKEY_USERS\.DEFAULT\Software\Microsoft\MediaPlayer\Setup\CreatedLinks\AppName")
if tempvar = "" then
WSHShell.RegWrite "HKEY_USERS\.DEFAULT\Software\Microsoft\MediaPlayer\Setup\CreatedLinks\AppName", "C:\Program Files\Windows Media Player\mplayer2.exe"
tempvar = "C:\Program Files\Windows Media Player\mplayer2.exe"
end if
WSHShell.RegWrite "HKCR\.mp3\", "mp3file"
WSHShell.RegWrite "HKCR\.mp3\Content Type\", "audio/mpeg"
WSHShell.RegWrite "HKCR\mp3file\shell\open\command\", """" + tempvar + """" + " /Open " + """" + "%L" + """"
WSHShell.RegWrite "HKCR\mp3file\shell\open\command\", """" + tempvar + """" + " /Play " + """" + "%L" + """"
DesktopPath = WSHShell.SpecialFolders("Desktop")
Set oShellLink = WshShell.CreateShortcut(DesktopPath & "\tneel-ne.lnk")
oShellLink.TargetPath = "C:\Program Files\TNEEL\StartTneel.hta"
oShellLink.IconLocation = "C:\Program Files\TNEEL\tneelne.ico"
oShellLink.Save
end function
</script>
</head>
<body bgcolor="#7DB7B9" ondragstart="window.event.dataTransfer.effectAllowed = 'none'" onLoad="" link="#003399" alink="#CC3300">
<span class="evalink"></span>
<div id="title" style="position:absolute; width:52px; height:115px; z-index:2; top: 62px; left: 36px"><img src="images/title.gif" width="49" height="367">
</div>
<div id="Layer3" style="position:absolute; width:732px; height:39px; z-index:6; left: 12px; top: 10px"><img src="images/threadbar.gif" width="100" height="39"><img src="images/emptybar.gif" width="605" height="39"><img src="images/endbar.gif" width="23" height="39"></div>
<div id="Layer2" style="position:absolute; width:645px; height:328px; z-index:2; top: 78px; left: 100px">
<H1><p align="center">TNEEL Installation</p></H1>
<p></p>
<p>Click the button below to install TNEEL on your computer. <br>
The TNEEL files will be installed into the folder C:\Program Files\TNEEL.
<br>
</p>
<p>The installation will take 10-15 minutes.</p>
<p> </p>
<form name="form1">
<p align="center"><input type=button value="Install TNEEL" name="button1" onClick="InstallFiles()"></p>
</form>
</div>
</body>